package data.network

import java.time.LocalDateTime

data class ApiResponse<T>(
    val code: Int,
    val message: String,
    val data: T
)

data class UserResponse(
    val id: Long,
    val name: String,
    val username: String,
    val email: String,
    val role: Set<String>,
    val timestamps: Timestamps
)

data class Timestamps(
    val createdAt: LocalDateTime,
    val updatedAt: LocalDateTime,
)

data class AuthenticationResponse(
    val authenticated: Boolean,
    val token: String,
    val id: Long,
    val name: String,
    val username: String,
    val email: String,
    val role: Set<String>
)

data class IntrospectResponse(
    val valid: Boolean
)

data class Error(
    val code: Int,
    val message: String
)


data class WeatherResponse(
    val name: String,
    val dt: Long,
    val weather: List<Weather>,
    val main: Wind,
    val clouds: Clouds,
    val sys: Sys
)

data class Weather(
    val main: String,
    val icon: String,
)

data class Main(
    val temp: Double,
    val humidity: Int,
)

data class Wind(
    val speed: Double
)

data class Clouds(
    val all: Int
)

data class Sys(
    val country: String
)